package inheritance;

import java.util.Date;
import java.util.GregorianCalendar;


public class Employee {
  private String name;
  private double salary;
  private Date hireDay;

  public Employee(String n, double s, int year, int month, int day) {
    this.name = n;
    this.salary = s;
    GregorianCalendar calendar = new GregorianCalendar(year, month - 1, day);
    this.hireDay = calendar.getTime();
  }


  public String getName() {
    return this.name;
  }


  public double getSalary() {
    return this.salary;
  }


  public Date getHireDay() {
    return this.hireDay;
  }


  public void raiseSalary(double byPercent) {
    double raise = this.salary * byPercent / 100;
    this.salary += raise;
  }
}
